<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

class UpdatePayerAddOpenidTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::table('payer', function (Blueprint $table) {
            $table->string('openid', 50)->nullable()->comment('微信OPENID')->after('user_id');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('payer', function (Blueprint $table) {
            $table->dropColumn([
                'openid'
            ]);
        });
    }
}
